# coding=utf-8

class ip_listto4(object):

    def ip_list(ip_1, ip_2, ip_3, ip_4):
        ip_num = len(open(r"iplist.txt", 'r', encoding='utf-8').readlines())
        ip_con = open(r"iplist.txt", 'r', encoding='utf-8').readlines()
        for i in range(0, ip_num):
            if i <= (ip_num // 4):
                ip_1.append((ip_con[i]).replace('\n', ''))
            elif i <= (ip_num // 4 * 2):
                ip_2.append((ip_con[i]).replace('\n', ''))
            elif i <= (ip_num // 4 * 3):
                ip_3.append((ip_con[i]).replace('\n', ''))
            else:
                ip_4.append((ip_con[i]).replace('\n', ''))
        return ip_4, ip_3, ip_2, ip_1, ip_con
